﻿namespace EyeOpen.Data
{
	using System.Data.Entity;
	using System.Data.Entity.ModelConfiguration.Conventions;
	using EyeOpen.Domain;

	public class WebSiteDbContext : DbContext
	{
		public WebSiteDbContext(string nameOrConnectionString)
			: base(nameOrConnectionString)
		{
		}

		public DbSet<Content> ContentRepository
		{
			get { return Set<Content>(); }
		}

		public DbSet<ContentLocalized> ContentLocalizedRepository
		{
			get { return Set<ContentLocalized>(); }
		}

		public DbSet<Language> LanguageRepository
		{
			get { return Set<Language>(); }
		}

		public DbSet<User> UserRepository
		{
			get { return Set<User>(); }
		}

		protected override void OnModelCreating(DbModelBuilder modelBuilder)
		{
			modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
		}
	}
}